<template>
  <div>
    <h2>商品详情:{{ $route.params.id}}</h2>
    <h2>参数:{{ $route.query}}</h2>
  </div>
</template>
<script>
export default {
  //校验参数
  validate({params,query}){
    console.log(params,query);
    return typeof params.id === 'number'
  },
}
</script>
